package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.user.ShoppingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController("adminShopController")
@RequestMapping("admin/shop")
@Api(tags = "营业模块相关接口")
public class ShopController {
    @Autowired
    private ShoppingService service;


    @PutMapping("{status}")
    @ApiOperation("设置营业状态的业务接口")
    public Result<Object> setShopStatus(@PathVariable Integer status){
        Result<Object> result = service.setShopStatus(status);

        return result;
    }

    @GetMapping("status")
    @ApiOperation("管理端获取营业状态的业务接口")
    public Result<Object> getShopStatus(){
        Result<Object> result = service.getShopStatus();

        return result;
    }
}
